package com.woniu.liuzhougov.itemAndTask.pojo;

import com.woniu.liuzhougov.authorityControl.pojo.User;
import com.woniu.liuzhougov.authorityControl.verification.AddDepartment;
import com.woniu.liuzhougov.authorityControl.verification.EditDepartment;
import com.woniu.liuzhougov.authorityControl.verification.Register;
import com.woniu.liuzhougov.authorityControl.verification.SetDepartmentLeader;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/*
 * @Author Wuyuzhong
 * @Description 部门
 * @Date 2019/4/19 14:32
 **/
public class Department {
    @NotNull(message = "地区id不能为空!",groups = {Register.class, EditDepartment.class, SetDepartmentLeader.class})
    private Integer departmentId;

    @Valid
    @NotNull(message = "领导不能为空!",groups = {SetDepartmentLeader.class})
    private User leader;

    @NotBlank(message = "部门名不能为空!",groups = {AddDepartment.class,EditDepartment.class})
    private String departmentName;

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public User getLeader() {
        return leader;
    }

    public void setLeader(User leader) {
        this.leader = leader;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    @Override
    public String toString() {
        return "Department{" +
                "departmentId=" + departmentId +
                ", leader=" + leader +
                ", departmentName='" + departmentName + '\'' +
                '}';
    }
}